3.4.80 \(\int \sec ^3(c+d x) (a+b \sin (c+d x)) \, dx\) [380]

Optimal. Leaf size=41 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\sec ^2(c+d x) (b+a \sin (c+d x))}{2 d} \]

[Out]

1/2*a*arctanh(sin(d*x+c))/d+1/2*sec(d*x+c)^2*(b+a*sin(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2747, 653, 212} \begin {gather*} \frac {\sec ^2(c+d x) (a \sin (c+d x)+b)}{2 d}+\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/(2*d) + (Sec[c + d*x]^2*(b + a*Sin[c + d*x]))/(2*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 653

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*e - c*d*x)/(2*a*c*(p + 1)))*(a + c*x
^2)^(p + 1), x] + Dist[d*((2*p + 3)/(2*a*(p + 1))), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x]
&& LtQ[p, -1] && NeQ[p, -3/2]

Rule 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a+b \sin (c+d x)) \, dx &=\frac {b^3 \text {Subst}\left (\int \frac {a+x}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^2(c+d x) (b+a \sin (c+d x))}{2 d}+\frac {(a b) \text {Subst}\left (\int \frac {1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\sec ^2(c+d x) (b+a \sin (c+d x))}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 52, normalized size = 1.27 \begin {gather*} \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {b \sec ^2(c+d x)}{2 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/(2*d) + (b*Sec[c + d*x]^2)/(2*d) + (a*Sec[c + d*x]*Tan[c + d*x])/(2*d)

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 50, normalized size = 1.22

method result size
derivativedivides \(\frac {a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {b}{2 \cos \left (d x +c \right )^{2}}}{d}\) \(50\)
default \(\frac {a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {b}{2 \cos \left (d x +c \right )^{2}}}{d}\) \(50\)
risch \(\frac {-i a \,{\mathrm e}^{3 i \left (d x +c \right )}+i a \,{\mathrm e}^{i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}}{d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{2}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) \(96\)
norman \(\frac {\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) \(151\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+1/2*b/cos(d*x+c)^2)

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 53, normalized size = 1.29 \begin {gather*} \frac {a \log \left (\sin \left (d x + c\right ) + 1\right ) - a \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right ) + b\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(a*log(sin(d*x + c) + 1) - a*log(sin(d*x + c) - 1) - 2*(a*sin(d*x + c) + b)/(sin(d*x + c)^2 - 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 67, normalized size = 1.63 \begin {gather*} \frac {a \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - a \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, a \sin \left (d x + c\right ) + 2 \, b}{4 \, d \cos \left (d x + c\right )^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(a*cos(d*x + c)^2*log(sin(d*x + c) + 1) - a*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*a*sin(d*x + c) + 2*b
)/(d*cos(d*x + c)^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3*(a+b*sin(d*x+c)),x)

[Out]

Integral((a + b*sin(c + d*x))*sec(c + d*x)**3, x)

________________________________________________________________________________________

Giac [A]
time = 3.61, size = 55, normalized size = 1.34 \begin {gather*} \frac {a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right ) + b\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/4*(a*log(abs(sin(d*x + c) + 1)) - a*log(abs(sin(d*x + c) - 1)) - 2*(a*sin(d*x + c) + b)/(sin(d*x + c)^2 - 1)
)/d

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 44, normalized size = 1.07 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )}{2\,d}-\frac {\frac {b}{2}+\frac {a\,\sin \left (c+d\,x\right )}{2}}{d\,\left ({\sin \left (c+d\,x\right )}^2-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d*x))/cos(c + d*x)^3,x)

[Out]

(a*atanh(sin(c + d*x)))/(2*d) - (b/2 + (a*sin(c + d*x))/2)/(d*(sin(c + d*x)^2 - 1))

________________________________________________________________________________________